# from multiprocessing import Process
from multiprocessing import Process
import time

def test():
    for i in range(1000000):
        print("子进程",i)
#     print(1)
#
if __name__ == '__main__':
    p=Process(target=test)
    p.start()
    # time.sleep(1)
    print('=======第')
    for i in range(1000000):
        print("主进程",i)
    p.join()

#
# from multiprocessing import Process
# import time
#
# x=1000
#
# # def test():
# #     global x
# #     x=0
# #     print('子进程结束',x)
#
# if __name__ == '__main__':
#     p=Process(target=test)
#     p.start()
#     print('=======主')
#     # time.sleep(3)
#     # print(x)
#     p.join()
